package com.wangzifan.mapper;

import com.wangzifan.entity.Teacher;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TeacherMapper {

    @Select("select * from teacher")
    List<Teacher> queryTeacher();

    @Select("select * from teacher where id=#{id}")
    Teacher queryTeacherById(Integer id);

    void deleteTeacher(List<Integer> ids);

    @Insert("insert into teacher(tno, tname) values (#{tno},#{tname})")
    void addTeacher(Teacher teacher);

    void updateTeacher(Teacher teacher);
}
